#ifndef CAMSHIFT_HPP_INCLUDED
#define CAMSHIFT_HPP_INCLUDED

#include "Process/observer.hpp"
#include "Process/process.hpp"

#include "Frame/states.hpp"

#include "opencv2/video/tracking.hpp"
#include "opencv2/imgproc/imgproc.hpp"
#include "opencv2/highgui/highgui.hpp"

using namespace cv;

class Cam_Shift :public Observer
{
public:
	Cam_Shift(Process *pro, States *_state);
	~Cam_Shift();
	 
	void GetMask(Image *_mask);
	void Update(Image &image);

	I_Rect TrackBox;	
protected:
private:
	States *state;
	
	Rect trackWindow;
	int hsize;
    float hranges[2];
    const float* phranges;
	Mat hsv, hue, mask, hist, histimg, backproj;
	int vmin, vmax, smin;
};
#endif // CAMSHIFT_HPP_INCLUDED
